-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
PERF: Avoid Series constructor in DataFrame(dict(...), columns=) #57205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
When you have a chance, could you take a look @jbrockmendel |
will take a look. i like the idea of getting Series out of here |
continue | ||
array = data_values[idx] | ||
arrays[i] = array | ||
if is_scalar(array) and isna(array): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is if a user specifically passes e.g. {key: pd.NaT}
? Do we have tests for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct, doesn't look like we have one explicitly so I'll add one
LGTM |
…das-dev#57205) * Avoid Series constructor inference in dict_to_mgr * test_constructors passes * Use construct_1d_arraylike_from_scalar * PERF: Avoid Series constructor in DataFrame(dict(...), columns=) * Fix whitespace and comment * typing * Just ignore * add bug fix and test * don't overwrite dtype
columns
specified #24368 (Replace xxxx with the GitHub issue number)doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.